/**
 * Created with IntelliJ IEDA.
 * Description:
 * User:86186
 * Date:2023-05-13
 * Time:21:47
 */
public class APP {
    public static void main(String[] args) {
////        // 1.先得到 spring 对象
//////        BeanFactory context = new XmlBeanFactory(new ClassPathResource("spring-config.xml"));
//        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
////        System.out.println("准备开始得到 Bean 对象了");
////        // 2.从 spring 中取出 bean 对象
//////        User user = (User) context.getBean("user");//根据 Bean 的名称(标识)来得到 Bean 对象的
//        User user = context.getBean(User.class);//根据 Bean 类型来获取 Bean
////        User user = context.getBean("user",User.class);//根据 Bean 名称+Bean类型获取Bean对象
////
////
//        // 3.使用Bean(可选)
//        System.out.println(user.sayHi());


        // 1.先得到 spring 对象
////        BeanFactory context = new XmlBeanFactory(new ClassPathResource("spring-config.xml"));
//        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
//
//        articleController articleController = context.getBean("articleController", com.demo.component.articleController.class);
//
//        System.out.println(articleController.SayHello());
    }
}
